﻿using BLL;
using Microsoft.AspNetCore.Http;
using Microsoft.AspNetCore.Mvc;
using MODEL;

namespace Management.Api.Controllers
{
    [Route("api/[controller]/[action]")]
    [ApiController]
    public class ManagementController : ControllerBase
    {
        private readonly DataService service;

        public ManagementController(DataService service)
        {
            this.service = service;
        }
        [HttpGet]
        public IActionResult GetAccounts()
        {
            return Ok(service.GetAccounts());   
        }
        [HttpGet]
        public IActionResult Delone(int Id)
        {
            return Ok(service.Delone(Id));
        }
    }
}
